import React, { useState } from 'react';
import '../../styles/jiang/ResidentParticulars.scss'
import { Button,Menu } from 'antd';
import { Outlet, useNavigate } from 'react-router-dom';


interface Props {

}
function ResidentParticulars(props: Props) {
    var navigate = useNavigate()
    const items = [
        { label: '健康档案', key: '/index/resident-particulars/health-file' },
        { label: '健康记录', key: '/index/resident-particulars/health-record' },
        { label: '签约信息', key: '/index/resident-particulars/signing-information' },
        { label: '服务记录', key: '/index/resident-particulars/service-log' },
    ]
    const [current, setCurrent] =useState('/index/resident-particulars/health-file');
    const myclick = (e: any) => {
        navigate(e.key)
        setCurrent(e.key);
    }
    const go = () => {
        // 跳转居民管理
    }

    return (
        <div className='resident-particulars' style={{padding:20}}>

            <div className='title'>
                居民详情
                <Button className='btn' onClick={() => { go() }} >发消息</Button>
            </div>
            <Menu  className='menu' onClick={myclick} selectedKeys={[current]} items={items}  mode="horizontal"/>
            <Outlet />


        </div>
    );
}

export default ResidentParticulars;
